<template>
	<view class="">
		<view class="info_item">
			<view class="basic_main">
				<view style="margin-left:13rpx">仓库</view>
				<view>{{info.warehouse?info.warehouse.name:''}}</view>
			</view>
			<view class="basic_main">
				<view style="margin-left:13rpx">供应商</view>
				<view>{{info.supplier?info.supplier.name:''}}</view>
			</view>
			<form-item v-if="listForm" :listForm="listForm" :isEdit="false"></form-item>
		</view>
		<!-- 审批流程 -->
		<approval-status :process="payment_approval"></approval-status>
	</view>
</template>

<script>
	import { netSetForm } from '@/api/api.js'
	import formItem from '@/components/form/formitem.vue'
	
	export default{
		components:{
			formItem
		},
		props:{
			info:{
				type:Object,
				default:{}
			},
			payment_approval:{   //审批流程
				type:Object,
				default:{}
			}
		},
		data() {
			return{
				listForm:null,
			}
		},
		created() {
			//获取 form
			this.getForm()
		},
		methods:{
			getForm() {
				netSetForm({type:'instock'}).then(res=>{
					res = res.data.data
					this.listForm = this.handleFormDefaultValue(res,this.info)
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.basic_main {
		display: flex;
		justify-content: space-between;
		padding: 0 32rpx;
		background-color: #fff;
		height: 90rpx;
		line-height: 90rpx;
		border-bottom: 1rpx solid #EAEAEA;
		:first-child {
			color: #999;
		}
		>view{
			font-size: 32rpx;
		}
	}
</style>